<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div  class="book_recorde" th:fragment="book_recorde">
    <table id="myTable">
        <!--<div class="book_recorde" th:fragment="book_recorde">-->
        <tr th:each="bookList : ${bookList}">
            <td>
                <div class="fe-mod-8-good fe-mod-8-good0" atc="0">
                    <div class="fe-mod-8-main fe-mod-8-main-opstyle0">
                        <a class="fe-mod-8-main-img" >
                            <div class="title" th:text="${bookList.name}">
                            </div>
                            <div class="case-perform-desc">
                                累计投票数
                            </div>
                            <div class="sale_num" th:text="${bookList.author}">
                            </div>
                        </a>
                    </div>
                </div>
            </td>
        </tr>
        <!--</div>-->
    </table>

    <input type="submit" value="投票" name="vote" id="vote" class="vote" onclick="sub()">
    <!--</form>-->
</div>
<script>
    function sub() {
        $.ajax({
            url : "/book_search",
            type : "GET",
            success : function (data) {
                alert("开始渲染页面啦");
                $(".book_recorde").html(data);
            },
            error:function (errorMsg) {
                alert(errorMsg);
                alert("请输入搜索内容");
            }
        })

    }
</script>
</body>
</html>